const Promise = require('bluebird');

module.exports = function ({UserOrders, sequelize}) {

    /**
     * 统计 V2
     */
    UserOrders.analyseV2 = function () {
        let sql = "select status, count(*) count from UserOrders group by status";
        return sequelize.query(sql, {
            type: sequelize.QueryTypes.SELECT
        });
    }

}